package cacco.jp.mld.panel.entity;


import java.io.Serializable;
import java.util.Date;


import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import cacco.jp.mld.panel.util.StringUtil;
@NamedQueries(value = { 
		@NamedQuery(
				name = "findUserByNamePassword", 
				query = "from UserEntity u where u.userName=:user_name") }
) 
	

public class UserEntity implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id;
	private String userName;
	private String password;
	private int isValidate;
	private String  timeCreate;
	private String  timeUpDate;
	
	public UserEntity(){
	}
	
	public UserEntity(String userName, String password){
		this.userName = userName;
		this.password = password;
		this.isValidate = 1;
		this.timeCreate = StringUtil.date2string(new Date());
		this.timeUpDate = this.timeCreate;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public int getIsValidate() {
		return isValidate;
	}
	public void setIsValidate(int isValidate) {
		this.isValidate = isValidate;
	}
	public String  getTimeCreate() {
		return timeCreate;
	}
	public void setTimeCreate(String timeCreate) {
		this.timeCreate = timeCreate;
	}
	public String getTimeUpDate() {
		return timeUpDate;
	}
	public void setTimeUpDate(String timeUpDate) {
		this.timeUpDate = timeUpDate;
	}

	
	
}